package com.thewaybetter.modules.client.pages;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Index extends AbstractPage {

	VerticalPanel rightPanel = new VerticalPanel();
	VerticalPanel centerPanel = new VerticalPanel();
	DockPanel mainPanel = new DockPanel();
	Image imgBack = new Image(GWT.getHostPageBaseURL()+"/images/ideas.jpg"); 
	
	@Override
	protected void initComponents() {
		mainPanel.add(centerPanel,DockPanel.CENTER);
		mainPanel.add(rightPanel,DockPanel.EAST);
		mainPanel.setStyleName("main-panel");
		mainPanel.setCellWidth(centerPanel, "70%");
		centerPanel.setStyleName("center-panel");
		rightPanel.setStyleName("right-panel");
		imgBack.setStyleName("imgBack");
	}
	
	@Override
	protected void drawPage() {
		addToPage(mainPanel);
		centerPanel.add(new HTML("<h1>There is always a better a way to do something,"
		+" it happens that we often don't see it.</h1>"
		+"The WayBetter helps you improve your ideas" 
		+"trough the community in a simple and fast way"));
		centerPanel.add(imgBack);
		rightPanel.add(new HTML("teste da direita"));
	}

}
